package com.qupeng.demo.kafka.kafkaspringbootproducer.admin.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.kafka.common.Uuid;
import org.apache.kafka.common.acl.AclOperation;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

@Data
@NoArgsConstructor
public class Topic {

    private String name;
    private int partitionCount;
    private short replicaFactor;
    private boolean internal;
    private Uuid topicId;
    private List<Partition> partitions = new ArrayList<>();
    private Set<AclOperation> authorizedOperations;

    public String getName() {
        return name;
    }

    public int getPartitionCount() {
        return partitionCount;
    }

    public short getReplicaFactor() {
        return replicaFactor;
    }

    public boolean isInternal() {
        return internal;
    }

    public Uuid getTopicId() {
        return topicId;
    }

    public List<Partition> getPartitions() {
        return partitions;
    }

    public Set<AclOperation> getAuthorizedOperations() {
        return authorizedOperations;
    }
}
